package com.gxa.worker.recycling.service.impl;

import com.gxa.core.recycling.pojo.CommunityManage;
import com.gxa.worker.recycling.mapper.CommunityManageMapper;
import com.gxa.worker.recycling.service.VillageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * @author Bei
 * @date 2021/12/10 16:22
 */
@Service
public class VillageServiceImpl implements VillageService {
    @Autowired
    CommunityManageMapper communityManageMapper;
//
//    @Override
//    public List<String> selectName() {
//        List<String> strings = communityManageMapper.selectName();
//        return strings;
//    }

    @Override
    public List<CommunityManage> selectIdByName(String name) {
        Example example = new Example(CommunityManage.class);
        Example.Criteria criteria = example.createCriteria();
        Example.Criteria criteria1 = criteria.andLike("provinces","%"+name+"%");
        List<CommunityManage> communityManages = communityManageMapper.selectByExample(example);
        return communityManages;
    }
}
